package com.yootk.listener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 自定义的消息监听方法
 */
public class MessageListener {
    private static final Logger LOGGER = LoggerFactory.getLogger(MessageListener.class);

    // 消息的接收处理
    public void onReciever(String msg) {
        LOGGER.info("【接收到新消息】{}", msg);
    }

    // 打开监听
    public void openChannel() {
        LOGGER.info("【通道连接】服务器消息通道建立成功。");
    }

    public void closeChannel() {
        LOGGER.info("【通道关闭】断开服务器连接，关闭消息监听服务。");
    }
}
